<template>
	<view class="content">
		<view class="padding-about-30 padding-top-01">
			<view @click="navigateTo('/pages/show/InformationDetails?id=' + item.id)"
				class="view display-flex margin-top-20" v-for="item,index in list" :key="index">
				<image :src="item.show_image" style="width: 189rpx;height: 152rpx;" class="border-radius-12"
					mode="aspectFill"></image>
				<view class="margin-left-20 display-flex flex-direction-column space-between file-1">
					<view class="">
						<view class="font-size-28 webkit-line-clamp" style="-webkit-line-clamp: 1;">
							{{item.title}}
						</view>
						<view class=" font-size-26 color-999 webkit-line-clamp" style="-webkit-line-clamp: 2;">
							<uv-parse :content="item.introduce"></uv-parse>
						</view>
					</view>
					<view class="text-right font-size-24 color-999 margin-top-10">
						{{item.createtime}}
					</view>
				</view>
			</view>
			<view class="kong">

			</view>
		</view>
		<div class="kong"></div>
		<div class="kong"></div>
		<m-tabbar :current="3"></m-tabbar>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from 'vue';
	import {
		onLoad,
		onShow,
		onReady,
		onReachBottom
	} from '@dcloudio/uni-app';
	import {
		nativeUI,
		navigateTo,
		navigateBack
	} from '@/utils/index.js';
	import * as api from '@/request/app.js'; // 引入api 方法
	import local from '@/utils/localStorage.js'; //引入本地存储方法
	//分页
	const pagingState = ref(false)
	const page = ref(1)
	const list = ref([])
	onLoad(function(option) {
		
	});
	onShow(function() {
		getactiveList()
	});
	async function getactiveList() {
		if (!pagingState.value) {
			const {
				code,
				data
			} = await api.getactiveList({
				page: page.value
			})
			list.value = list.value.concat(data.data)
			if (data.current_page == data.last_page) {
				pagingState.value = true
				return
			}
			page.value++
		}
	}
	onReady(function() {});
	onReachBottom(function() {
		getactiveList()
	});
</script>

<style scoped lang="scss">
	.view {
		padding: 15rpx;
		background: #FFFFFF;
		border-radius: 20rpx;
	}
</style>